/**
 *    Copyright 2009-2020 the original author or authors.
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */
package org.apache.ibatis.aapl.annotation;

import org.apache.ibatis.aapl.annotation.impl.FieldInjectionStrategy;

import java.lang.annotation.*;

/**
 * 指定若干个字段，然后根据相对应的策略进行字段注入
 * props.length必须要和strategies.length长度相等
 * 对于每一个声明的属性，拦截器都会对其进行拦截，并根据
 * 策略值进行注入。
 * <p>
 * 目前可以考虑实现的功能：
 * 1.自动注入当前登录用户相关信息
 * 2.自动注入时间相关信息
 * 3.自动注入
 *
 * @author gu
 * @date 2020/3/30 11:10
 */
@Documented
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Inherited
public @interface FieldInjection {
  String[] props() default {};

  Class<? extends FieldInjectionStrategy>[] strategies() default {};
}

